package com.meteor.vo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.TransPojo;
import com.meteor.entity.Building;
import com.meteor.entity.Community;
import com.meteor.entity.Room;
import com.meteor.entity.Unit;
import com.meteor.framework.common.base.AutoEntity;
import com.meteor.framework.common.utils.DateUtils;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author lynn
 * @date 2024/2/28
 *
 * @Description:房屋绑定管理
 */
@Data
public class OwnerRoomVO implements Serializable, TransPojo {

    private String id;

    @Schema(description= "小区id")
    @Trans(type = TransType.SIMPLE, target = Community.class, fields = "communityName", ref = "communityName")
    private String communityId;

    @Schema(description= "小区名称")
    private String communityName;

    @Schema(description= "楼栋id")
    @Trans(type = TransType.SIMPLE, target = Building.class, fields = "buildingName", ref = "buildingName")
    private String buildingId;

    @Schema(description= "楼栋名称")
    private String buildingName;

    @Schema(description= "单元id")
    @Trans(type = TransType.SIMPLE, target = Unit.class, fields = "unitName", ref = "unitName")
    private String unitId;

    @Schema(description= "单元名称")
    private String unitName;

    @Schema(description= "房间id")
    @Trans(type = TransType.SIMPLE, target = Room.class, fields = "roomName", ref = "roomName")
    private String roomId;

    @Schema(description= "房间名称")
    private String roomName;


    @Schema(description= "业主id")
    private String ownerId;

    @Schema(description= "业主姓名")
    private String ownerName;

    @Schema(description = "手机号码")
    private String ownerMobile;


    @Schema(description= "业主类型")
    private String ownerType;


    @Schema(description= "绑定状态 0=审核中,1=绑定,2=审核失败")
    private Integer roomStatus;

    @Schema(description = "组织id")
    private String orgId;

    @Schema(description = "组织名称")
    private String orgName;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date createTime;

    @Schema(description = "审批时间")
    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date auditTime;

    @Schema(description = "创建人id")
    private String createdBy;

    @Schema(description = "创建人姓名")
    private String createdUserName;


    private List<OwnerRoomVO> members;

    @Schema(description = "能否解绑")
    private Boolean canUnBind;

    @Schema(description = "审批意见")
    private String auditOpinion;


}
